import React, { Component } from 'react'

const withCopyright = (YouComponent) => {
    return class WithCopyright extends Component {
        render() {
            return (
                <>
                    {/* 为了不覆盖传过来组件的props， 这边把this.props传递下去 */}
                    <YouComponent {...this.props} />
                    <div>这是高阶组件的内容</div>
                </>
            )
        }
    }
}

export default withCopyright